<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- 头部 -->	
<%@ include file="./space_head1.jsp"%>
<!-- 导航 -->	
<%@ include file="./space_head2.jsp"%>

<script language="javascript">
	// 初始化点击分页按钮的方法
	onPageClickFunction = function(pageNo, event){
		location.href = '/sumer/collect/initCollect/' + pageNo + '/10';
	};

	function collect_del(id) {
		if (window.confirm('确定要删除收藏吗？')) {
			$.post("/sumer/collect/delCollectInfo", {id: id}, function(result) {
				if(result.state == 1){
					alert('删除成功！');
					location.reload();
				}else {
					alert('删除失败！');
				}
			}, 'json');
		}
	}
</script>

 <div class="zyt_body" style="height:auto;">

	<div class="user_body01" style="background-color:#FFFFFF;">
		<div class="zyzx_more_div">
			<div class="zyzx_more_divt">
				<div class="zyzx_more_left">
					<div class="kczx_son_divbodytbl">
						<div id="tab1" class="user_tab1" style="height:530px;left:5px;" >
							<table class="collect_left_tr" cellspacing="0"  cellpadding="0" style="text-align:center;" >
								<tr  style="background-color:#EEE;height:40px;text-align:center;border:1px solid #DDD;">
									<td width="400px" style="text-align:center;">&nbsp;&nbsp;&nbsp;&nbsp;收藏名称 </td>
									<td width="100px">收藏夹 </td>
									<td width="100px">收藏来源 </td>
									<td width="100px">收藏时间 </td>
								<c:if test="${isMeData}"> 	<td width="80px">操作 </td> </c:if>
								</tr>
								
								<!-- 是当前所属人员 -->
								<%-- <c:if test="${isMeData}"> --%>
										<c:forEach items="${pageData.data}" var="collect">								
										<tr style="border-bottom:1px solid #DDD;">
											<td style="text-align:left;">&nbsp;&nbsp;&nbsp;&nbsp; <a target="_blank" href="${collect.url}">${collect.name}</a> </td>
											<td width="90px">${collect.folderName} </td>
											<td width="80px">${collect.resource} </td>
											<td > ${collect.createDate} </td>
										<c:if test="${isMeData}">	<td > <a href="#" style="color:#3381a7" onclick="collect_del(${collect.id});">删除</a> </td></c:if>
										</tr>
										</c:forEach>
								<%-- </c:if> --%>
								
							</table>
									<br>
							<%@ include file="../paging_form.jsp"%>

						</div>
					</div>
				</div>
				<div class="zyzx_more_right">
					<div class="zyzx_more_divlt" style="height:40px;"></div>
					<div class="zyzx_more_divlt">
						<table width="220px" height="150px" cellspacing="0" cellpadding="0" >
							<tr width="220px" >
								<td height="20px" width="180px" class="retext02" style="color:#578429;font-weight:bold;border-bottom:1px solid #DDD;" >收藏统计 </td>
							</tr>
							<tr width="220px">
								<td height="130px" valign="top" colspan="2" class="zyzx_text01" style="line-height:20px;"><br/>
									收藏总数：${pageData.totalCount} </td>
							</tr>
						</table>
					</div>
				</div>
				<div class="zyzx_more_right">
					<div class="zyzx_more_divlt">
						<table width="220px" height="180px" cellspacing="0" cellpadding="0">
						
							<tr width="220px">
								<td height="20px" width="180px" class="retext02" style="color:#578429;font-weight:bold;border-bottom:1px solid #DDD;" >收藏夹 </td>
								<c:if test="${isMeData}"> 
								<td style="border-bottom:1px solid #DDD;"> <a href="/sumer/collect/manage"> 管理 </a> </td>
							</c:if>
							</tr>
							
							<tr width="220px">
								<td height="130px" valign="top" colspan="2" class="zyzx_text01" style="line-height:20px;"> <br/>
									<c:forEach items="${folderStatic}" var="folder">
										<a href="#">${folder.folderName}<span style="color:#666">（${folder.cnt}）</span></a><br/>
									</c:forEach>
									<br/>
									<c:if test="${isMeData}"> 
									<a href="#" onMouseDown="col_add()">
									<div class="add_newcollect"> <img src="/images/add02.png"/> &nbsp;新建收藏夹 </div>
									</a>
									</c:if>
								</td>
							</tr>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
 
<!--新建收藏夹-->
 <%@ include file="collect_mod.jsp"%>
<!--end新建收藏夹-->


 
 <!--  结尾 -->
 <%@ include file="../all_buttom.jsp"%>
 </body>
</html>